# required libraries
library("PKPDmisc")
library("ggplot2")
library("dplyr")
## 
## Attaching package: 'dplyr'
## 
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## 
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library("mlxR")
library("reshape2")
library("knitr")
knitr::opts_chunk$set(echo=FALSE)

ORAL FORMULATION

1. PK profile of 100 mg oral (SD)

(PK profile of 100 mg oral, SD (t=0), CL = 0.1 L/hr, V = 1 L, ka = 0.5/hr, F = 0.8)

1a. Patient’s clearance decreases by 25%.

(PK profile of 100 mg oral, SD (t=0), CL = 0.075 L/hr, V= 1 L, ka = 0.5/hr, F=0.8)

1b. Patient’s clearance decreases by 50%.

(PK profile of 100 mg oral, SD (t=0), CL = 0.05 L/hr, V= 1 L)

1c. Overlay plot of patient with decreased clearance and normal clearance.

(PK profile of 100 mg oral, SD (t=0), CL = 0.1, 0.075, 0.05 L/hr, V=1, Ka = 0.8)

2. Patient is administered 100 mg oral loading dose and a 100 mg maintenance dose every 6 hours.

(PK profile of 100 mg oral, LD (t=0), MD (q= 6 hr), CL = 0.1 L/hr, V = 1 L, ka = 0.5/hr, F = 0.8)

2a. Patient’s clearance decreases by 25%.

(PK profile of 100 mg oral, LD (t=0), MD (q= 6 hr), CL = 0.075 L/hr, V= 1 L, ka = 0.5/hr, F=0.8)

2b. Patient’s clearance decreases by 50%.

(PK profile of 100 mg oral, LD (t=0), MD (q= 6 hr), CL = 0.05 L/hr, V= 1 L, ka = 0.5/hr, F=0.8)

2c. Patient consumes a high fat meal 48 hours after beginning treatment, which reduces bioavailability by 50%.

(PK profile of 100 mg oral, LD (t=0), MD (q=6 hr), CL = 0.1 L/hr, V = 1 L, ka = 0.5/hr, F=0.8, 0.4)

2d. Overlay plot of patient with decreased clearance and normal clearance.

(PK profile of 100 mg oral, LD (t=0), MD (q=6 hr), CL = 0.1, 0.075, 0.05 L/hr, V = 1 L, ka = 0.5/hr, F=0.8)

2e. Overlay plot of patient with normal bioavailability and decreased bioavailability.

(PK profile of 100 mg oral, LD (t=0), MD (q=6 hr), CL = 0.1 L/hr, V = 1 L, ka = 0.5/hr, F=0.8, 0.4)

3. Patient is administered 100 mg oral loading dose, followed by a maintenance dose of 100 mg every 12 hours.

(PK profile of 100 mg oral, LD (t=0), MD (q=12 hr), CL=0.1 L/hr, V=1L, ka=0.5/hr, F=0.8)

3a. Patient’s clearance decreases by 25%.

(PK profile of 100 mg oral, LD (t=0), MD (q= 12 hr), CL = 0.075 L/hr, V= 1 L, ka = 0.5/hr, F=0.8)

3b. Patient’s clearance decreases by 50%.

(PK profile of 100 mg oral, LD (t=0), MD (q=12 hr), CL = 0.05 L/hr, V= 1 L, ka=0.5/hr, F=0.8)

3c. Patient consumes a high fat meal 48 hours after beginning treatment, which reduces bioavailability by 50%.

(PK profile of 100 mg oral, LD (t=0), MD (q=12 hr), CL = 0.1 L/hr, V = 1 L, ka = 0.5/hr, F=0.4)

3d. Overlay plot of patient with decreased clearances and normal clearance.

(PK profile of 100 mg oral, LD (t=0), MD (q=12 hr), CL = 0.1, 0.075, 0.05 L/hr, V = 1 L, ka = 0.5/hr, F=0.8)

3e. Overlay plot of patient with normal bioavailability and decreased bioavailability.

(PK profile of 100 mg oral, LD (t=0), MD (q=12 hr), CL = 0.1 L/hr, V = 1 L, ka = 0.5/hr, F=0.8, 0.4)

4. Patient is administered a 100 mg loading dose, followed by a maintenance dose of 100 mg every 24 hours.

(PK profile of 100 mg oral, LD (t=0), MD (q=24 hr), CL = 0.1 L/hr, V=1L, ka=0.5/hr, F=0.8)

4a. Patient’s clearance decreases by 25%.

(PK profile of 100 mg oral, LD (t=0), MD (q= 24 hr), CL = 0.075 L/hr, V= 1 L, ka = 0.5/hr, F=0.8)

4b. Patient’s clearance decreases by 50%.

(PK profile of 100 mg oral, LD (t=0), MD (q= 24 hr), CL = 0.05 L/hr, V= 1 L, ka=0.5/hr, F=0.8)

4c. Patient consumes a high fat meal 48 hours after beginning treatment, which reduces bioavailability by 50%.

(PK profile of 100 mg oral, LD (t=0), MD (q=24 hr), CL = 0.1 L/hr, V = 1 L, ka = 0.5/hr, F=0.4)

4d. Overlay plot of patient with decreased clearances and normal clearance.

(PK profile of 100 mg oral, LD (t=0), MD (q=24 hr), CL = 0.1, 0.075, 0.05 L/hr, V = 1 L, ka = 0.5/hr, F=0.8)

4e. Overlay plot of patient with normal bioavailability and decreased bioavailability.

(PK profile of 100 mg oral, LD (t=0), MD (q=6 hr), CL = 0.1 L/hr, V = 1 L, ka = 0.5/hr, F=0.8, 0.4)

5. Overlay plots of all dosing intervals

## Session info --------------------------------------------------------------
##  setting  value                       
##  version  R version 3.2.2 (2015-08-14)
##  system   x86_64, darwin13.4.0        
##  ui       X11                         
##  language (EN)                        
##  collate  en_US.UTF-8                 
##  tz       America/New_York            
##  date     2015-12-09
## Packages ------------------------------------------------------------------
##  package    * version  date       source                            
##  assertthat   0.1      2013-12-06 CRAN (R 3.2.0)                    
##  colorspace   1.2-6    2015-03-11 CRAN (R 3.2.0)                    
##  DBI          0.3.1    2014-09-24 CRAN (R 3.2.0)                    
##  devtools     1.9.1    2015-09-11 CRAN (R 3.2.0)                    
##  digest       0.6.8    2014-12-31 CRAN (R 3.2.0)                    
##  dplyr      * 0.4.3    2015-09-01 CRAN (R 3.2.0)                    
##  evaluate     0.8      2015-09-18 CRAN (R 3.2.0)                    
##  formatR      1.2.1    2015-09-18 CRAN (R 3.2.0)                    
##  ggplot2    * 1.0.1    2015-03-17 CRAN (R 3.2.0)                    
##  gtable       0.1.2    2012-12-05 CRAN (R 3.2.0)                    
##  htmltools    0.2.6    2014-09-08 CRAN (R 3.2.0)                    
##  knitr      * 1.11     2015-08-14 CRAN (R 3.2.2)                    
##  labeling     0.3      2014-08-23 CRAN (R 3.2.0)                    
##  lazyeval     0.1.10   2015-01-02 CRAN (R 3.2.0)                    
##  magrittr     1.5      2014-11-22 CRAN (R 3.2.0)                    
##  MASS         7.3-44   2015-08-30 CRAN (R 3.2.0)                    
##  memoise      0.2.1    2014-04-22 CRAN (R 3.2.0)                    
##  mlxR       * 2.2.0    2015-05-31 CRAN (R 3.2.0)                    
##  munsell      0.4.2    2013-07-11 CRAN (R 3.2.0)                    
##  PKPDmisc   * 0.3.4.3  2015-10-17 Github (dpastoor/PKPDmisc@2d99b00)
##  plyr         1.8.3    2015-06-12 CRAN (R 3.2.0)                    
##  proto        0.3-10   2012-12-22 CRAN (R 3.2.0)                    
##  R6           2.1.1    2015-08-19 CRAN (R 3.2.0)                    
##  Rcpp         0.12.1   2015-09-10 CRAN (R 3.2.0)                    
##  reshape2   * 1.4.1    2014-12-06 CRAN (R 3.2.0)                    
##  rmarkdown    0.8.1    2015-10-10 CRAN (R 3.2.2)                    
##  scales       0.3.0    2015-08-25 CRAN (R 3.2.0)                    
##  stringi      0.5-5    2015-06-29 CRAN (R 3.2.0)                    
##  stringr      1.0.0    2015-04-30 CRAN (R 3.2.0)                    
##  XML          3.98-1.3 2015-06-30 CRAN (R 3.2.0)                    
##  yaml         2.1.13   2014-06-12 CRAN (R 3.2.0)